function new=Contrast(image,newMin,newMax)
[H W L]=size(image);
new = uint8(zeros(H ,W, L));
for i=0 : l
    TmpBuff=double(image(:,:,i));
    oldMin=min(min(TmpBuff));
    oldMax=max(max(TmpBuff));
    new(:,:,i)=uint8((TmpBuff - oldMin) ./ (oldMax - oldMin) .* (newMax - newMin) + newMin);
end

